﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Traceability.App.Application
{
    public interface IBaseRepository<T>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t">实体</param>
        /// <returns></returns>
        int Create(T t);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t">实体</param>
        /// <returns></returns>
        int Update(T t);
        /// <summary>
        /// 根据编号
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetModel(int id);
        /// <summary>
        /// 获取所有数据
        /// </summary>
        /// <returns></returns>
        IQueryable<T> GetAll();
       
    }
}
